package com.atguigu.boot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.Map;

@SpringBootApplication
public class Boot05Web01Application {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(Boot05Web01Application.class, args);

        String[] beanNamesForType = run.getBeanNamesForType(WebMvcConfigurer.class);
        for (String s : beanNamesForType) {
            System.out.println(s);
        }
        System.out.println("----");
        
        Map<String, WebMvcConfigurer> beansOfType = run.getBeansOfType(WebMvcConfigurer.class);
        System.out.println(beansOfType);
    }

}
